#pragma once
#include "IGenericFile.h"

namespace System
{
	class DriveNode;
	typedef std::vector<DriveNode*>					DriveNodeList;
	typedef std::vector<DriveNode*>::iterator		DriveNodeI;
	typedef std::vector<DriveNode*>::const_iterator DriveNodeCI;
	
	class DriveNode
	{
	public:
		DriveNode(DriveNode* parent = NULL);
		~DriveNode(void);
		const DriveNodeList&	getChildren() const;
		bool					isDirty(void) const;
		bool					isLeaf(void) const;
		DriveNode*				getParent();
	protected:
		DriveNode*		m_parent;
		DriveNodeList	m_children;
	protected:
		IGenericFile*	m_file;
		bool			m_dirtyFlag;
		bool			m_loaded;
	};

	inline bool		DriveNode::isDirty(void) const
	{
		return m_dirtyFlag;
	}
	inline const DriveNodeList&	DriveNode::getChildren() const
	{
		return m_children;
	}
	inline bool		DriveNode::isLeaf(void) const
	{
		return !!(m_children.size());
	}
	inline DriveNode* DriveNode::getParent()
	{
		return m_parent;
	}
}